/**
 * Created by Administrator on 2016/10/11.
 */

var LOCALIZABEL_DATA = LOCALIZABEL_DATA || {};

jGame.localizabel = {};

jGame.translate = function (text) {
    if(jGame.translate._data[text])return jGame.translate._data[text];
    var data = LOCALIZABEL_DATA[jGame.MD5(text).toUpperCase()];
    if(data && data[cc.sys.language]) {
        jGame.translate._data[text] = data[cc.sys.language];
        return data[cc.sys.language];
    }else {
        return text;
    }
    return text;
}

jGame.translate.cleanCache = function () {
    jGame.translate._data = {};
};

jGame.translate.cleanCache();